<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserLog extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users_log', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->nullable();
            $table->integer('admin_id')->nullable();
            $table->timestamp("log_time");
            $table->timestamps();
        });
        DB::statement("ALTER TABLE `users_log` comment'管理员操作日志'"); // 表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users_log');
    }
}
